package com.program.facesigninsystem.service.impl;

import com.program.facesigninsystem.dao.IUserInfoDao;
import com.program.facesigninsystem.entity.UserInfo;
import com.program.facesigninsystem.service.IUserInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Mapler
 */
@Service
public class UserInfoServiceImpl implements IUserInfoService {
    @Resource
    private IUserInfoDao iUserInfoDao;

    @Override
    public UserInfo loginUser(String openid){
        return iUserInfoDao.loginUser(openid);
    }

    @Override
    public void updateToken(String uid,String token) {
        iUserInfoDao.updateToken(uid,token);
    }

    @Override
    public void addUser(String uid, String openid, String token) {
        iUserInfoDao.addUser(uid, openid, token);
    }

    @Override
    public void addFace(String uid, byte[] facefeature) {
        iUserInfoDao.addFace(uid,facefeature);
    }

    @Override
    public byte[] selectFaceFeature(String uid) {
       return (byte[])iUserInfoDao.selectFaceFeature(uid);
    }
}
